package Visualization.plot;

/** Defines an interface for extracting the data for plotting. 
    The interface contains two methods for dataextraction. You should
    return null in one of the two implementations. The non-null data will then
    be plotted.
*/
public interface DataPlot2DExtraction
{

  /** Extract the data as a 2 dimensional array of objects. <br>
      <b>Note:</b> All second-indexed arrays must have equal length.
  */
  public Object[][] extract2DAsObjects(int plotternumber);

  /** Extract the data as a 2 dimensional array of doubles.<br>
      <b>Note:</b> All second-indexed arrays must have equal length. */
  public double[][] extract2DAsDoubles(int plotternumber);

  /** Extract an array of pairs with the plotting types.<br>
      An entry in the array has the following intrepretation:
      First entry is a plottype for that particular column, second entry is
      the subplottype, which indicates the pointstyle used in the plot.<br>
      <b>Plottypes (first entry)<br>
      0 = Raw data plot. Data is plotted. (1 column)<br>
      1 = Mean plot with confidence interval. (2 columns)<br>
      2 = xy plot. Data is plotted. (2 column)<br>
      <b>Subplottypes (second entry)<br>
      0 = lines<br>
      1 = points<br>
      2 = lines with end marker (black dot)<br>
  */
  public int[][] extract2DDataTypes(int plotternumber);
  
  /** Extract the name of a graph given an index. */
  public String extract2DName(int index, int plotternumber);

}

